package finalproject.controller.commands;

import finalproject.model.player.Player;
import finalproject.view.StringManager;

/**
 * The interact command
 * @author Buisson Kevin
 *
 */
public class InteractCommand extends Command {

	/**
	 * 
	 * @param player the player issuing the command
	 * @param args the args of the command
	 */
	public InteractCommand(Player player, String[] args)
	{
		super(player, args);
	}

	@Override
	public boolean process()
	{
		// Light on
		if (getPlayer().getCurrentRoom().isLighted())
		{
			// Do activity
			if (getPlayer().getCurrentRoom().doActivity(getPlayer()))
				StringManager.outPutText(getPlayer().getCurrentRoom().toString());
			// Do nothing
			else
				StringManager.outPut("someactivites");
			
			return true;
		}
		
		// No light
		StringManager.outPut("unlighted");
		return false;
	}
}
